﻿using System.Text.Json;
using System.Text.Json.Serialization;
using DimensionsHelper.Common.Contracts.TableFormatter.Options;
using DimensionsHelper.Common.Contracts.DataCollector.Options;
using DimensionsHelper.Common.Sql;
using DimensionsHelper.Common.Utils.Converters;

namespace DimensionsHelper.Common.Utils;

[JsonSourceGenerationOptions(
    WriteIndented = true,
    Converters = [typeof(ColorJsonConverter), typeof(ExcelStyleColorJsonConverter)],
    IgnoreReadOnlyFields = true,
    IgnoreReadOnlyProperties = true,
    PropertyNameCaseInsensitive = true,
    UseStringEnumConverter = true,
    ReadCommentHandling = JsonCommentHandling.Skip,
    PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
    NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals)]
[JsonSerializable(typeof(TableFormatterOptions))]
[JsonSerializable(typeof(CollectorOptions))]
[JsonSerializable(typeof(MetadataCodeMap))]
public partial class ServiceJsonContext : JsonSerializerContext;